package com.asj.house.controller;

import com.asj.house.client.HouseHitsClient;
import com.asj.house.client.HouseSubscribeClient;
import com.asj.house.returns.RespEntity;
import com.asj.house.vo.param.SubscribeParam;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiImplicitParam;
import io.swagger.annotations.ApiOperation;
import lombok.extern.slf4j.Slf4j;
import org.springframework.web.bind.annotation.*;

import javax.annotation.Resource;

@RestController
@RequestMapping("house-subscribe")
@Api(value = "预约看房接口", tags = "预约看房接口")
@Slf4j
public class HouseSubscribeController {

    @Resource
    private HouseSubscribeClient houseSubscribeClient;

    @PostMapping("/order")
    @ApiOperation(value = "预约看房")
    public RespEntity subscribeHouse(@RequestBody SubscribeParam subscribeParam) {
        RespEntity respEntity = houseSubscribeClient.orderHouse(subscribeParam);
        return respEntity;
    }

}
